-
Notifications
You must be signed in to change notification settings - Fork 38
Separate Static and Kinetic Coefficients of Friction #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added `smooth_mu`, `smooth_mu_derivative`, `smooth_mu_f0`, `smooth_mu_f1`, `smooth_mu_f2`, `smooth_mu_f1_over_x`, and `smooth_mu_f2_x_minus_f1_over_x3` functions in `smooth_mu.cpp` and `smooth_mu.hpp` to handle the transition between static and kinetic friction smoothly. - Implemented unit tests for the smooth friction functions in `test_smooth_mu.cpp`, including gradient and Hessian checks using finite difference methods. - Ensured proper assertions and edge case handling for the friction coefficient calculations.
TODO: * Add separate coeff. in TangentialCollision * Implement smooth_mu for adhesion
- Introduced smooth friction mollifier functions: smooth_mu_a0, smooth_mu_a1, smooth_mu_a2, smooth_mu_a1_over_x, and smooth_mu_a2_x_minus_mu_a1_over_x3 in adhesion.cpp and adhesion.hpp. - Updated tangential adhesion potential methods to utilize smooth friction functions instead of direct calculations. - Refactored existing friction mollifier functions for improved clarity and performance. - Added unit tests for the new smooth friction mollifier functions to ensure correctness and stability.
… tangential collisions
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 96.42% 96.47% +0.05%
==========================================
Files 102 103 +1
Lines 7766 7856 +90
==========================================
+ Hits 7488 7579 +91
+ Misses 278 277 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ntation - Enhance documentation for adhesion and friction modules with new smooth_mu functions. - Update bindings to include new smooth_mu functionalities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances tangential collision handling by separating static (mu_s
) and kinetic (mu_k
) friction coefficients and implementing smooth transitions between them using new smooth_mu
functions.
- Replaced single friction coefficient
mu
with separatemu_s
andmu_k
throughout the codebase - Added new
smooth_mu
module with functions for smooth friction coefficient transitions - Updated potential calculations to handle distinct static/kinetic coefficients with fallback behavior
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/ipc/friction/smooth_mu.hpp/.cpp |
New module implementing smooth static-to-kinetic friction transitions |
src/ipc/collisions/tangential/tangential_collision.hpp |
Updated collision struct to use mu_s and mu_k instead of single mu |
src/ipc/potentials/tangential_potential.hpp/.cpp |
Refactored potential interface to accept separate friction coefficients |
src/ipc/potentials/friction_potential.cpp |
Updated to use new smooth mu functions |
tests/src/tests/friction/test_smooth_mu.cpp |
Comprehensive finite difference tests for new smooth mu functions |
Description
This pull request introduces enhancements to tangential collision handling by distinguishing between static and kinetic friction coefficients (
mu_s
andmu_k
) and implementing smooth transitions between them.Tangential Collision Enhancements:
Distinction between static and kinetic friction coefficients: Updated
TangentialCollision
class to replacemu
with separatemu_s
(static friction coefficient) andmu_k
(kinetic friction coefficient). This change applies to the class definition and all related methods.Updated
TangentialCollisions::build
method: Modified the method to handle separatemu_s
andmu_k
coefficients, ensuring that all calculations account for the distinction between static and kinetic friction.Smooth Friction Coefficient Implementation:
New
smooth_mu
functions: Added functions to compute smooth transitions between static and kinetic friction coefficients, including derivatives and related mathematical formulations. These functions improve the modeling of friction forces at varying tangential velocities.Integration with adhesion module: Incorporated smooth friction coefficient calculations into the adhesion module.
Type of change
How Has This Been Tested?
smooth_mu
Checklist